<?php
!defined('M_P') && exit('Forbidden');

$uid = $winduid ? $winduid : 0;
$author = $windid ? $windid : '游客';
/*添加团购信息处理*/
InitGP(array('hid'),'GP',2);
InitGP(array('hname','username','gender','phone','mobel','qq','msn','email','budget','area','remark'),'GP');
strlen($remark) > 400 && Showmsg("团购留言不能超过200个汉字");
empty($username) && Showmsg("请填写团购人姓名");
empty($phone) && Showmsg("请填写电话信息");

/*敏感词过滤*/
$wordsfb = L::loadClass('FilterUtil', 'filter');
if (($banword = $wordsfb->comprise($remark, false)) !== false) {
	Showmsg('content_wordsfb');
}

$groupby_db = House::loadDB('groupbuy');
$groupby = array(
		'uid'		=> $uid,
		'author'	=> $author,
		'hid'		=> $hid,
		'hname'		=> $hname,
		'username'	=> $username,
		'gender'	=> $gender,
		'phone'		=> $phone,
		'mobel'		=> $mobel,
		'qq'		=> $qq,
		'msn'		=> $msn,
		'email'		=> $email,
		'budget'	=> $budget,
		'area'		=> $area,
		'ctime'		=> $timestamp,
		'remark'	=> $remark,
);
$groupby_db->insertHouseGroupbuySing($groupby);
Showmsg("团购信息发表成功",1);
?>